import { css } from "@emotion/css";
import React from "react";
export const Icon: React.FC<{
  className: string;
  iconName: string;
  color?: string;
}> = ({ className, iconName, color }) => {
  return (
    <>
      <svg
        className={
          className
            ? `svg-icon ${className}`
            : css`
                position: relative;
                vertical-align: -2px;
              `
        }
        aria-hidden={true}
      >
        <use xlinkHref={`#${iconName}`} fill={color} />
      </svg>
    </>
  );
};
